﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XDCCManager.Model.Servers
{
	public class FtpUploadService : UploadService
	{
		public FtpUploadService()
		{
			Port = 21;
		}

		public override object Clone()
		{
			return new FtpUploadService() { Host = Host, Password = Password, Port = Port, Username = Username };
		}

		public override bool Equals(object obj)
		{
			if (base.Equals(obj))
				return true;
			if (!(obj is FtpUploadService))
				return false;
			FtpUploadService service = obj as FtpUploadService;
			return (service.Host == Host) &&
				(service.Port == Port) &&
				(service.Username == Username) &&
				(service.Password == Password);
		}

		private string host;

		public string Host
		{
			get { return host; }
			set { if (host != value) { host = value; OnPropertyChanged("Host"); } }
		}
		private ushort port;

		public ushort Port
		{
			get { return port; }
			set { if (port != value) { port = value; OnPropertyChanged("Port"); } }
		}
		private string username;

		public string Username
		{
			get { return username; }
			set { if (username != value) { username = value; OnPropertyChanged("Username"); } }
		}
		private string password;

		public string Password
		{
			get { return password; }
			set { if (password != value) { password = value; OnPropertyChanged("Password"); } }
		}

	}
}
